package com.ljd.music.service.impl;

import com.ljd.music.dao.AdminMapper;
import com.ljd.music.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    /***
     * 核实密码是否正确
     * @param username  用户名
     * @param password  密码
     * @return          密码正确返回true,反之返回false
     */
    @Override
    public boolean verifyPassword(String username, String password) {
        return adminMapper.verifyPassword(username, password) > 0;
    }
}
